package com.koko.feign;

import com.koko.config.FeignClientConfig;
import com.koko.order.entity.Order;
import com.koko.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(name = "third-party-service", url = "http://localhost:7680", configuration = FeignClientConfig.class)
public interface ThirdPartyFeignService {
    @GetMapping("/email/code")
    Result<String> sendEmailCode(
            @RequestParam("email") String email,
            @RequestParam("code") String code);

    @PostMapping("/email/paysuccess")
    Result<String> sendPaySuccessMessageToUser(@RequestBody Map<String, Object> content);
}
